applyIfNotNull

inline fun <T, A> T.applyIfNotNull(value: A?, action: T.(A) -> Unit): T(source)

Applies the action to the receiver if the value is not null. In either case returns the receiver itself.